//
//  XCPopverController.swift
//  小陈微博Swift用纯代码创建
//
//  Created by 小陈 on 16/3/1.
//  Copyright © 2016年 小陈. All rights reserved.
//

import UIKit

class XCPopverController: UITableViewController {
 private let ReuseId = "cell"
    let data = ["首页", "好友圈", "群微博", "我的微博", "新浪微博"]
    
    
    override func viewDidLoad() {
       super.viewDidLoad()
        tableView.backgroundColor = UIColor(red: 232/255.0, green: 232/255.0, blue: 232/255.0, alpha: 1)
       tableView.registerClass(UITableViewCell.self, forCellReuseIdentifier: ReuseId)
    }
    

    
}
    //MARK: - TableView datsour
extension XCPopverController {
    override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
    return data.count
    }
    
    override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
        let cell =  tableView.dequeueReusableCellWithIdentifier(ReuseId, forIndexPath: indexPath)

        cell.textLabel?.text = data[indexPath.row]
        
        return cell
        
    }
    
}